// 基于template/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{spinalCase ctrl.codeName}}-form-vo.ts.hbs生成
import { ControlVOBase } from '@/core';
import { transformValue } from '@/utils';
import { model } from './main-form-model';

export class FormControlVO extends ControlVOBase {
	constructor(data: any) {
		//  表单预置字段
		data.srfwfmemo = data['srfwfmemo'] ? data['srfwfmemo'] : '';
		data.srffrontuf = data['srffrontuf'] ? data['srffrontuf'] : '';
		super(data);
		//  表单自持属性
		this.$ownKeys = [
			'srfupdatedate',
			'srforikey',
			'srfkey',
			'srfmajortext',
			'srftempmode',
			'srfuf',
			'srfdeid',
			'srfsourcekey',
			'id',
			'name',
			'authentication_uri',
			'authentication_method',
			'disabled',
			'sort',
			'base_config',
			'response_type',
			'response_success_flag',
			'response_config',
		];
	}
	get srfupdatedate() {
		return this.$DO.update_time;
	}
	set srfupdatedate(value: any) {
		this.$DO.update_time = value;
	}
	get srfkey() {
		return this.$DO.id;
	}
	set srfkey(value: any) {
		this.$DO.id = value;
	}
	get srfmajortext() {
		return this.$DO.name;
	}
	set srfmajortext(value: any) {
		this.$DO.name = value;
	}
	get id() {
		return this.$DO.id;
	}
	set id(value: any) {
		this.$DO.id = value;
	}
	get name() {
		return this.$DO.name;
	}
	set name(value: any) {
		this.$DO.name = value;
	}
	get authentication_uri() {
		return this.$DO.authentication_uri;
	}
	set authentication_uri(value: any) {
		this.$DO.authentication_uri = value;
	}
	get authentication_method() {
		return this.$DO.authentication_method;
	}
	set authentication_method(value: any) {
		this.$DO.authentication_method = value;
	}
	get disabled() {
		return this.$DO.disabled;
	}
	set disabled(value: any) {
		this.$DO.disabled = value;
	}
	get sort() {
		return this.$DO.sort;
	}
	set sort(value: any) {
		this.$DO.sort = value;
	}
	get base_config() {
		return this.$DO.base_config;
	}
	set base_config(value: any) {
		this.$DO.base_config = value;
	}
	get response_type() {
		return this.$DO.response_type;
	}
	set response_type(value: any) {
		this.$DO.response_type = value;
	}
	get response_success_flag() {
		return this.$DO.response_success_flag;
	}
	set response_success_flag(value: any) {
		this.$DO.response_success_flag = value;
	}
	get response_config() {
		return this.$DO.response_config;
	}
	set response_config(value: any) {
		this.$DO.response_config = value;
	}
	// 界面主键标识
	get auth_provider() {
		return this.$DO.id;
	}

	set auth_provider(value: any) {
		this.$DO.id = value;
	}

	//  工作流预置字段
	srfwfmemo: any;
	srffrontuf: any;

	//  无实体属性表单项
	get srftempmode() {
		return this.$DO.srftempmode;
	}

	set srftempmode(value: any) {
		this.$DO.srftempmode = value;
	}

	//  表单重复器

	/**
	 * 返回后台数据
	 *
	 * @return {*}
	 * @memberof FormControlVO
	 */
	public getDo() {
		return {
			srffrontuf: this.srffrontuf,
			id: this.$DO.id,
			name: this.$DO.name,
			authentication_uri: this.$DO.authentication_uri,
			authentication_method: this.$DO.authentication_method,
			disabled: this.$DO.disabled,
			sort: this.$DO.sort,
			base_config: this.$DO.base_config,
			response_type: this.$DO.response_type,
			response_success_flag: this.$DO.response_success_flag,
			response_config: this.$DO.response_config,
			update_time: this.$DO.update_time,
		};
	}
}
